/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.common.c;

import android.content.Context;
import android.os.Build.VERSION;
import android.os.Looper;
import android.util.Log;
import com.qihoo.gamecenter.sdk.common.i.a;
import com.qihoo.gamecenter.sdk.common.i.c;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.security.KeyStore;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponse;
import org.apache.http.HttpVersion;
import org.apache.http.client.HttpClient;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.params.HttpClientParams;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.RequestWrapper;
import org.apache.http.impl.conn.SingleClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.BasicHttpProcessor;
import org.apache.http.protocol.HttpContext;

public final class f implements HttpClient {
    public static long a = 256L;
    private static String[] c = { "text/", "application/xml", "application/json" };
    public static final byte[] b = { 48, -126, 7, -55, 48, -126, 5, -79, -96, 3, 2, 1, 2, 2, 1, 1, 48, 13, 6, 9, 42,
            -122, 72, -122, -9, 13, 1, 1, 5, 5, 0, 48, 125, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 73, 76, 49, 22, 48,
            20, 6, 3, 85, 4, 10, 19, 13, 83, 116, 97, 114, 116, 67, 111, 109, 32, 76, 116, 100, 46, 49, 43, 48, 41, 6,
            3, 85, 4, 11, 19, 34, 83, 101, 99, 117, 114, 101, 32, 68, 105, 103, 105, 116, 97, 108, 32, 67, 101, 114,
            116, 105, 102, 105, 99, 97, 116, 101, 32, 83, 105, 103, 110, 105, 110, 103, 49, 41, 48, 39, 6, 3, 85, 4, 3,
            19, 32, 83, 116, 97, 114, 116, 67, 111, 109, 32, 67, 101, 114, 116, 105, 102, 105, 99, 97, 116, 105, 111,
            110, 32, 65, 117, 116, 104, 111, 114, 105, 116, 121, 48, 30, 23, 13, 48, 54, 48, 57, 49, 55, 49, 57, 52,
            54, 51, 54, 90, 23, 13, 51, 54, 48, 57, 49, 55, 49, 57, 52, 54, 51, 54, 90, 48, 125, 49, 11, 48, 9, 6, 3,
            85, 4, 6, 19, 2, 73, 76, 49, 22, 48, 20, 6, 3, 85, 4, 10, 19, 13, 83, 116, 97, 114, 116, 67, 111, 109, 32,
            76, 116, 100, 46, 49, 43, 48, 41, 6, 3, 85, 4, 11, 19, 34, 83, 101, 99, 117, 114, 101, 32, 68, 105, 103,
            105, 116, 97, 108, 32, 67, 101, 114, 116, 105, 102, 105, 99, 97, 116, 101, 32, 83, 105, 103, 110, 105, 110,
            103, 49, 41, 48, 39, 6, 3, 85, 4, 3, 19, 32, 83, 116, 97, 114, 116, 67, 111, 109, 32, 67, 101, 114, 116,
            105, 102, 105, 99, 97, 116, 105, 111, 110, 32, 65, 117, 116, 104, 111, 114, 105, 116, 121, 48, -126, 2, 34,
            48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 3, -126, 2, 15, 0, 48, -126, 2, 10, 2, -126, 2, 1,
            0, -63, -120, -37, 9, -68, 108, 70, 124, 120, -97, -107, 123, -75, 51, -112, -14, 114, 98, -42, -63, 54,
            32, 34, 36, 94, -50, -23, 119, -14, 67, 10, -94, 6, 100, -92, -52, -114, 54, -8, 56, -26, 35, -16, 110,
            109, -79, 60, -35, 114, -93, -123, 28, -95, -45, 61, -76, 51, 43, -45, 47, -81, -2, -22, -80, 65, 89, 103,
            -74, -60, 6, 125, 10, -98, 116, -123, -42, 121, 76, -128, 55, 122, -33, 57, 5, 82, 89, -9, -12, 27, 70, 67,
            -92, -46, -123, -123, -46, -61, 113, -13, 117, 98, 52, -70, 44, -118, 127, 30, -113, -18, -19, 52, -48, 17,
            -57, -106, -51, 82, 61, -70, 51, -42, -35, 77, -34, 11, 59, 74, 75, -97, -62, 38, 47, -6, -75, 22, 28, 114,
            53, 119, -54, 60, 93, -26, -54, -31, 38, -117, 26, 54, 118, 92, 1, -37, 116, 20, 37, -2, -19, -75, -96,
            -120, 15, -35, 120, -54, 45, 31, 7, -105, 48, 1, 45, 114, 121, -6, 70, -42, 19, 42, -88, -71, -90, -85,
            -125, 73, 29, -27, -14, -17, -35, -28, 1, -114, 24, 10, -113, 99, 83, 22, -123, 98, -87, 14, 25, 58, -52,
            -75, 102, -90, -62, 107, 116, 7, -28, 43, -31, 118, 62, -76, 109, -40, -10, 68, -31, 115, 98, 31, 59, -60,
            -66, -96, 83, 86, 37, 108, 81, 9, -9, -86, -85, -54, -65, 118, -3, 109, -101, -13, -99, -37, -65, 61, 102,
            -68, 12, 86, -86, -81, -104, 72, -107, 58, 75, -33, -89, 88, 80, -39, 56, 117, -87, 91, -22, 67, 12, 2, -1,
            -103, -21, -24, 108, 77, 112, 91, 41, 101, -100, -35, -86, 93, -52, -81, 1, 49, -20, 12, -21, -46, -115,
            -24, -22, -100, 123, -26, 110, -9, 39, 102, 12, 26, 72, -41, 110, 66, -29, 63, -34, 33, 62, 123, -31, 13,
            112, -5, 99, -86, -88, 108, 26, 84, -76, 92, 37, 122, -55, -94, -55, -117, 22, -90, -69, 44, 126, 23, 94,
            5, 77, 88, 110, 18, 29, 1, -18, 18, 16, 13, -58, 50, 127, 24, -1, -4, -12, -6, -51, 110, -111, -24, 54, 73,
            -66, 26, 72, 105, -117, -62, -106, 77, 26, 18, -78, 105, 23, -63, 10, -112, -42, -6, 121, 34, 72, -65, -70,
            123, 105, -8, 112, -57, -6, 122, 55, -40, -40, 13, -46, 118, 79, 87, -1, -112, -73, -29, -111, -46, -35,
            -17, -62, 96, -73, 103, 58, -35, -2, -86, -100, -16, -44, -117, 127, 114, 34, -50, -58, -97, -105, -74, -8,
            -81, -118, -96, 16, -88, -39, -5, 24, -58, -74, -75, 92, 82, 60, -119, -74, 25, 42, 115, 1, 10, 15, 3, -77,
            18, 96, -14, 122, 47, -127, -37, -93, 110, -1, 38, 48, -105, -11, -117, -35, -119, 87, -74, -83, 61, -77,
            -81, 43, -59, -73, 118, 2, -16, -91, -42, 43, -102, -122, 20, 42, 114, -10, -29, 51, -116, 93, 9, 75, 19,
            -33, -69, -116, 116, 19, 82, 75, 2, 3, 1, 0, 1, -93, -126, 2, 82, 48, -126, 2, 78, 48, 12, 6, 3, 85, 29,
            19, 4, 5, 48, 3, 1, 1, -1, 48, 11, 6, 3, 85, 29, 15, 4, 4, 3, 2, 1, -82, 48, 29, 6, 3, 85, 29, 14, 4, 22,
            4, 20, 78, 11, -17, 26, -92, 64, 91, -91, 23, 105, -121, 48, -54, 52, 104, 67, -48, 65, -82, -14, 48, 100,
            6, 3, 85, 29, 31, 4, 93, 48, 91, 48, 44, -96, 42, -96, 40, -122, 38, 104, 116, 116, 112, 58, 47, 47, 99,
            101, 114, 116, 46, 115, 116, 97, 114, 116, 99, 111, 109, 46, 111, 114, 103, 47, 115, 102, 115, 99, 97, 45,
            99, 114, 108, 46, 99, 114, 108, 48, 43, -96, 41, -96, 39, -122, 37, 104, 116, 116, 112, 58, 47, 47, 99,
            114, 108, 46, 115, 116, 97, 114, 116, 99, 111, 109, 46, 111, 114, 103, 47, 115, 102, 115, 99, 97, 45, 99,
            114, 108, 46, 99, 114, 108, 48, -126, 1, 93, 6, 3, 85, 29, 32, 4, -126, 1, 84, 48, -126, 1, 80, 48, -126,
            1, 76, 6, 11, 43, 6, 1, 4, 1, -127, -75, 55, 1, 1, 1, 48, -126, 1, 59, 48, 47, 6, 8, 43, 6, 1, 5, 5, 7, 2,
            1, 22, 35, 104, 116, 116, 112, 58, 47, 47, 99, 101, 114, 116, 46, 115, 116, 97, 114, 116, 99, 111, 109, 46,
            111, 114, 103, 47, 112, 111, 108, 105, 99, 121, 46, 112, 100, 102, 48, 53, 6, 8, 43, 6, 1, 5, 5, 7, 2, 1,
            22, 41, 104, 116, 116, 112, 58, 47, 47, 99, 101, 114, 116, 46, 115, 116, 97, 114, 116, 99, 111, 109, 46,
            111, 114, 103, 47, 105, 110, 116, 101, 114, 109, 101, 100, 105, 97, 116, 101, 46, 112, 100, 102, 48, -127,
            -48, 6, 8, 43, 6, 1, 5, 5, 7, 2, 2, 48, -127, -61, 48, 39, 22, 32, 83, 116, 97, 114, 116, 32, 67, 111, 109,
            109, 101, 114, 99, 105, 97, 108, 32, 40, 83, 116, 97, 114, 116, 67, 111, 109, 41, 32, 76, 116, 100, 46, 48,
            3, 2, 1, 1, 26, -127, -105, 76, 105, 109, 105, 116, 101, 100, 32, 76, 105, 97, 98, 105, 108, 105, 116, 121,
            44, 32, 114, 101, 97, 100, 32, 116, 104, 101, 32, 115, 101, 99, 116, 105, 111, 110, 32, 42, 76, 101, 103,
            97, 108, 32, 76, 105, 109, 105, 116, 97, 116, 105, 111, 110, 115, 42, 32, 111, 102, 32, 116, 104, 101, 32,
            83, 116, 97, 114, 116, 67, 111, 109, 32, 67, 101, 114, 116, 105, 102, 105, 99, 97, 116, 105, 111, 110, 32,
            65, 117, 116, 104, 111, 114, 105, 116, 121, 32, 80, 111, 108, 105, 99, 121, 32, 97, 118, 97, 105, 108, 97,
            98, 108, 101, 32, 97, 116, 32, 104, 116, 116, 112, 58, 47, 47, 99, 101, 114, 116, 46, 115, 116, 97, 114,
            116, 99, 111, 109, 46, 111, 114, 103, 47, 112, 111, 108, 105, 99, 121, 46, 112, 100, 102, 48, 17, 6, 9, 96,
            -122, 72, 1, -122, -8, 66, 1, 1, 4, 4, 3, 2, 0, 7, 48, 56, 6, 9, 96, -122, 72, 1, -122, -8, 66, 1, 13, 4,
            43, 22, 41, 83, 116, 97, 114, 116, 67, 111, 109, 32, 70, 114, 101, 101, 32, 83, 83, 76, 32, 67, 101, 114,
            116, 105, 102, 105, 99, 97, 116, 105, 111, 110, 32, 65, 117, 116, 104, 111, 114, 105, 116, 121, 48, 13, 6,
            9, 42, -122, 72, -122, -9, 13, 1, 1, 5, 5, 0, 3, -126, 2, 1, 0, 22, 108, -103, -12, 102, 12, 52, -11, -48,
            -123, 94, 125, 10, -20, -38, 16, 78, 56, 28, 94, -33, -90, 37, 5, 75, -111, 50, -63, -24, 59, -15, 61, -35,
            68, 9, 91, 7, 73, -118, 41, -53, 102, 2, -73, -79, -102, -9, 37, -104, 9, 60, -114, 27, -31, -35, 54, -121,
            43, 75, -69, 104, -45, 57, 102, 61, -96, 38, -57, -14, 57, -111, 29, 81, -85, -126, 123, 126, -43, -50, 90,
            -28, -30, 3, 87, 112, 105, -105, 8, -7, 94, 88, -90, 10, -33, -116, 6, -102, 69, 22, 22, 56, 10, 94, 87,
            -10, 98, -57, 122, 2, 5, -26, -68, 30, -75, -14, -98, -12, -87, 41, -125, -8, -78, 20, -29, 110, 40, -121,
            68, -61, -112, 26, -34, 56, -87, 60, -84, 67, 77, 100, 69, -50, -35, 40, -87, 92, -14, 115, 123, 4, -8, 23,
            -24, -85, -79, -13, 46, 92, 100, 110, 115, 49, 58, 18, -72, -68, -77, 17, -28, 125, -113, -127, 81, -102,
            59, -115, -119, -12, 77, -109, 102, 123, 60, 3, -19, -45, -102, 29, -102, -13, 101, 80, -11, -96, -48, 117,
            -97, 47, -81, -16, -22, -126, 67, -104, -8, 105, -100, -119, 121, -60, 67, -114, 70, 114, -29, 100, 54, 18,
            -81, -9, 37, 30, 56, -119, -112, 119, 126, -61, 107, 106, -71, -61, -53, 68, 75, -84, 120, -112, -117, -25,
            -57, 44, 30, 75, 17, 68, -56, 52, 82, 39, -51, 10, 93, -97, -123, -63, -119, -43, 26, 120, -14, -107, 16,
            83, 50, -35, -128, -124, 102, 117, -39, -75, 104, 40, -5, 97, 46, -66, -124, -88, 56, -64, -103, 18, -122,
            -91, 30, 103, 100, -83, 6, 46, 47, -87, 112, -123, -57, -106, 15, 124, -119, 101, -11, -114, 67, 84, 14,
            -85, -35, -91, -128, 57, -108, 96, -64, 52, -55, -106, 112, 44, -93, 18, -11, 31, 72, 123, -67, 28, 126,
            107, -73, -99, -112, -12, 34, 59, -82, -8, -4, 42, -54, -6, -126, 82, -96, -17, -81, 75, 85, -109, -21,
            -63, -75, -16, 34, -117, -84, 52, 78, 38, 34, 4, -95, -121, 44, 117, 74, -73, -27, 125, 19, -41, -72, 12,
            100, -64, 54, -46, -55, 47, -122, 18, -116, 35, 9, -63, 27, -126, 59, 115, 73, -93, 106, 87, -121, -108,
            -27, -42, 120, -59, -103, 67, 99, -29, 77, -32, 119, 45, -31, 101, -103, 114, 105, 4, 26, 71, 9, -26, 15,
            1, 86, 36, -5, 31, -65, 14, 121, -87, 88, 46, -71, -60, 9, 1, 126, -107, -70, 109, 0, 6, 62, -78, -22, 74,
            16, 57, -40, -48, 43, -11, -65, -20, 117, -65, -105, 2, -59, 9, 27, 8, -36, 85, 55, -30, -127, -5, 55,
            -124, 67, 98, 32, -54, -25, 86, 75, 101, -22, -2, 108, -63, 36, -109, 36, -95, 52, -21, 5, -1, -102, 34,
            -82, -101, 125, 63, -15, 101, 81, 10, -90, 48, 106, -77, -12, -120, 28, -128, 13, -4, 114, -118, -24, -125,
            94 };
    private static final HttpRequestInterceptor d = new HttpRequestInterceptor() {
        public void process(HttpRequest paramHttpRequest, HttpContext paramHttpContext) {
            if ((Looper.myLooper() == null) || (Looper.myLooper() != Looper.getMainLooper()))
                return;
            throw new RuntimeException("This thread forbids HTTP requests");
        }
    };
    private final HttpClient e;
    private RuntimeException f = new IllegalStateException("AndroidHttpClient created and never closed");
    private volatile b g;

    public static f a(String paramString, Context paramContext) {
        BasicHttpParams localBasicHttpParams = new BasicHttpParams();
        HttpConnectionParams.setStaleCheckingEnabled(localBasicHttpParams, false);
        HttpConnectionParams.setConnectionTimeout(localBasicHttpParams, 15000);
        HttpConnectionParams.setSoTimeout(localBasicHttpParams, 20000);
        HttpConnectionParams.setSocketBufferSize(localBasicHttpParams, 8192);
        HttpProtocolParams.setVersion(localBasicHttpParams, HttpVersion.HTTP_1_1);
        HttpProtocolParams.setContentCharset(localBasicHttpParams, "UTF-8");
        HttpProtocolParams.setUseExpectContinue(localBasicHttpParams, false);
        HttpClientParams.setRedirecting(localBasicHttpParams, false);
        HttpProtocolParams.setUserAgent(localBasicHttpParams, paramString);
        try {
            SchemeRegistry localSchemeRegistry = new SchemeRegistry();
            localSchemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
            SSLSocketFactory localSSLSocketFactory = null;
            if (Build.VERSION.SDK_INT >= 11) {
                localObject = CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(b));
                KeyStore localKeyStore = KeyStore.getInstance("PKCS12", "BC");
                localKeyStore.load(null, null);
                localKeyStore.setCertificateEntry("trust", (Certificate) localObject);
                localSSLSocketFactory = new SSLSocketFactory(localKeyStore);
            }
            else {
                localSSLSocketFactory = SSLSocketFactory.getSocketFactory();
            }
            localSchemeRegistry.register(new Scheme("https", localSSLSocketFactory, 443));
            Object localObject = new SingleClientConnManager(localBasicHttpParams, localSchemeRegistry);
            return new f((ClientConnectionManager) localObject, localBasicHttpParams);
        } catch (Exception localException) {
            c.b("SingleHttpClient", new Object[] { localException.toString() });
        }
        return ((f) b(paramString, paramContext));
    }

    public static f b(String paramString, Context paramContext) {
        BasicHttpParams localBasicHttpParams = new BasicHttpParams();
        HttpConnectionParams.setStaleCheckingEnabled(localBasicHttpParams, false);
        HttpConnectionParams.setConnectionTimeout(localBasicHttpParams, 15000);
        HttpConnectionParams.setSoTimeout(localBasicHttpParams, 20000);
        HttpConnectionParams.setSocketBufferSize(localBasicHttpParams, 8192);
        HttpProtocolParams.setVersion(localBasicHttpParams, HttpVersion.HTTP_1_1);
        HttpProtocolParams.setContentCharset(localBasicHttpParams, "UTF-8");
        HttpProtocolParams.setUseExpectContinue(localBasicHttpParams, false);
        HttpClientParams.setRedirecting(localBasicHttpParams, false);
        HttpProtocolParams.setUserAgent(localBasicHttpParams, paramString);
        SchemeRegistry localSchemeRegistry = new SchemeRegistry();
        localSchemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
        localSchemeRegistry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
        SingleClientConnManager localSingleClientConnManager = new SingleClientConnManager(localBasicHttpParams,
                localSchemeRegistry);
        return new f(localSingleClientConnManager, localBasicHttpParams);
    }

    public static f a(String paramString) {
        return b(paramString, null);
    }

    private f(ClientConnectionManager paramClientConnectionManager, HttpParams paramHttpParams) {
        this.e = new DefaultHttpClient(paramClientConnectionManager, paramHttpParams) {
            protected BasicHttpProcessor createHttpProcessor() {
                BasicHttpProcessor localBasicHttpProcessor = super.createHttpProcessor();
                localBasicHttpProcessor.addRequestInterceptor(f.b());
                localBasicHttpProcessor.addRequestInterceptor(new f.a(f.this, null));
                return localBasicHttpProcessor;
            }

            protected HttpContext createHttpContext() {
                BasicHttpContext localBasicHttpContext = new BasicHttpContext();
                localBasicHttpContext.setAttribute("http.authscheme-registry", getAuthSchemes());
                localBasicHttpContext.setAttribute("http.cookiespec-registry", getCookieSpecs());
                localBasicHttpContext.setAttribute("http.auth.credentials-provider", getCredentialsProvider());
                return localBasicHttpContext;
            }
        };
    }

    protected void finalize() {
        super.finalize();
        if (this.f == null)
            return;
        Log.e("SingleHttpClient", "Leak found", this.f);
        this.f = null;
    }

    public void a() {
        if (this.f == null)
            return;
        getConnectionManager().shutdown();
        this.f = null;
    }

    public HttpParams getParams() {
        return this.e.getParams();
    }

    public ClientConnectionManager getConnectionManager() {
        return this.e.getConnectionManager();
    }

    public HttpResponse execute(HttpUriRequest paramHttpUriRequest) {
        return this.e.execute(paramHttpUriRequest);
    }

    public HttpResponse execute(HttpUriRequest paramHttpUriRequest, HttpContext paramHttpContext) {
        return this.e.execute(paramHttpUriRequest, paramHttpContext);
    }

    public HttpResponse execute(HttpHost paramHttpHost, HttpRequest paramHttpRequest) {
        return this.e.execute(paramHttpHost, paramHttpRequest);
    }

    public HttpResponse execute(HttpHost paramHttpHost, HttpRequest paramHttpRequest, HttpContext paramHttpContext) {
        return this.e.execute(paramHttpHost, paramHttpRequest, paramHttpContext);
    }

    public Object execute(HttpUriRequest paramHttpUriRequest, ResponseHandler paramResponseHandler) {
        return this.e.execute(paramHttpUriRequest, paramResponseHandler);
    }

    public Object execute(HttpUriRequest paramHttpUriRequest, ResponseHandler paramResponseHandler,
            HttpContext paramHttpContext) {
        return this.e.execute(paramHttpUriRequest, paramResponseHandler, paramHttpContext);
    }

    public Object execute(HttpHost paramHttpHost, HttpRequest paramHttpRequest, ResponseHandler paramResponseHandler) {
        return this.e.execute(paramHttpHost, paramHttpRequest, paramResponseHandler);
    }

    public Object execute(HttpHost paramHttpHost, HttpRequest paramHttpRequest, ResponseHandler paramResponseHandler,
            HttpContext paramHttpContext) {
        return this.e.execute(paramHttpHost, paramHttpRequest, paramResponseHandler, paramHttpContext);
    }

    private static String b(HttpUriRequest paramHttpUriRequest, boolean paramBoolean)
  {
    StringBuilder localStringBuilder = new StringBuilder();
    localStringBuilder.append("curl ");
    ByteArrayOutputStream localByteArrayOutputStream;
    for (localByteArrayOutputStream : paramHttpUriRequest.getAllHeaders())
    {
      if (!(paramBoolean))
      {
        if (localByteArrayOutputStream.getName().equals("Authorization"))
          continue;
        if (localByteArrayOutputStream.getName().equals("Cookie"))
          continue;
      }
      localStringBuilder.append("--header \"");
      localStringBuilder.append(localByteArrayOutputStream.toString().trim());
      localStringBuilder.append("\" ");
    }
    ??? = paramHttpUriRequest.getURI();
    Object localObject2;
    if (paramHttpUriRequest instanceof RequestWrapper)
    {
      localObject2 = ((RequestWrapper)paramHttpUriRequest).getOriginal();
      if (localObject2 instanceof HttpUriRequest)
        ??? = ((HttpUriRequest)localObject2).getURI();
    }
    localStringBuilder.append("\"");
    localStringBuilder.append(???);
    localStringBuilder.append("\"");
    if (paramHttpUriRequest instanceof HttpEntityEnclosingRequest)
    {
      localObject2 = (HttpEntityEnclosingRequest)paramHttpUriRequest;
      HttpEntity localHttpEntity = ((HttpEntityEnclosingRequest)localObject2).getEntity();
      if ((localHttpEntity != null) && (localHttpEntity.isRepeatable()))
        if (localHttpEntity.getContentLength() < 1024L)
        {
          localByteArrayOutputStream = new ByteArrayOutputStream();
          localHttpEntity.writeTo(localByteArrayOutputStream);
          String str;
          if (a(paramHttpUriRequest))
          {
            str = a.b(localByteArrayOutputStream.toByteArray(), 2);
            localStringBuilder.insert(0, "echo '" + str + "' | base64 -d > /tmp/$$.bin; ");
            localStringBuilder.append(" --data-binary @/tmp/$$.bin");
          }
          else
          {
            str = localByteArrayOutputStream.toString();
            localStringBuilder.append(" --data-ascii \"").append(str).append("\"");
          }
        }
        else
        {
          localStringBuilder.append(" [TOO MUCH DATA TO INCLUDE]");
        }
    }
    return ((String)(String)localStringBuilder.toString());
  }

    private static boolean a(HttpUriRequest paramHttpUriRequest)
  {
    Header[] arrayOfHeader1 = paramHttpUriRequest.getHeaders("content-encoding");
    Header localHeader;
    if (arrayOfHeader1 != null)
      for (localHeader : arrayOfHeader1)
        if ("gzip".equalsIgnoreCase(localHeader.getValue()))
          return true;
    arrayOfHeader1 = paramHttpUriRequest.getHeaders("content-type");
    if (arrayOfHeader1 != null)
      for (localHeader : arrayOfHeader1)
        for (String str : c)
          if (localHeader.getValue().startsWith(str))
            return false;
    return true;
  }

    private class a implements HttpRequestInterceptor {
        public void process(HttpRequest paramHttpRequest, HttpContext paramHttpContext) {
            f.b localb = f.a(f.this);
            if ((localb == null) || (!(f.b.a(localb))) || (!(paramHttpRequest instanceof HttpUriRequest)))
                return;
            f.b.a(localb, f.a((HttpUriRequest) paramHttpRequest, false));
        }
    }

    private static class b {
        private final String a;
        private final int b;

        private boolean a() {
            return Log.isLoggable(this.a, this.b);
        }

        private void a(String paramString) {
            Log.println(this.b, this.a, paramString);
        }
    }
}